Skip to content

Added Jupyter Notebook Support#245

Draft
Gitstar-OC wants to merge 4 commits intobetter-auth:mainfrom
Gitstar-OC:feat/jupyter-notebook-support
Draft

Added Jupyter Notebook Support#245
Gitstar-OC wants to merge 4 commits intobetter-auth:mainfrom
Gitstar-OC:feat/jupyter-notebook-support

Conversation

@Gitstar-OC
Copy link
Copy Markdown
Contributor

Summary

fixes #194, this PR adds support for rendering Jupyter Notebooks (.ipynb files) directly in the repository file viewer. It includes a custom renderer that handles both markdown and code cells, with syntax highlighting and LaTeX math support (via KaTeX).

New File

  • apps/web/src/components/repo/notebook-viewer.tsx: Main component for parsing and rendering notebook cells, including preprocessing for Jupyter-specific LaTeX quirks.

Updated Files

  • apps/web/src/app/(app)/repos/[owner]/[repo]/blob/[...path]/page.tsx: Integrated NotebookViewer into the file viewer logic to detect .ipynb extensions.
  • apps/web/src/components/repo/code-content-wrapper.tsx & repo-layout-wrapper.tsx: Adjusted layouts to support the notebook view.
  • apps/web/src/app/globals.css: Added global styles for notebook cell containers and code blocks.
  • apps/web/package.json: Added necessary dependencies for notebook rendering.
  • apps/web/src/components/shared/client-markdown.tsx & highlighted-code-block.tsx: Minor updates to support notebook-specific rendering requirements.

Images of how it looks are added in the issue!

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 1, 2026

@Gitstar-OC is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Member

@ping-maxwell ping-maxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey could you also fix merge conflicts too? Thanks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add .github-images to .gitignore please?

Comment thread apps/web/src/app/globals.css Outdated
@@ -1,5 +1,6 @@
@import "tailwindcss";
@import "tw-animate-css";
@import "katex/dist/katex.min.css";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to find a way to only fetch the css for this when we actually render notebook.
You could consider importing it like:

// notebook-viewer.tsx

import "katex/dist/katex.min.css";

Comment thread pnpm-lock.yaml Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've switched to bun, please remove this file.

@Gitstar-OC
Copy link
Copy Markdown
Contributor Author

sure! on it

@Gitstar-OC Gitstar-OC force-pushed the feat/jupyter-notebook-support branch from c1f93c7 to f40f12c Compare March 3, 2026 06:43
@Gitstar-OC
Copy link
Copy Markdown
Contributor Author

ci is failing because of lockfile, fixing it!

@Gitstar-OC Gitstar-OC marked this pull request as draft March 3, 2026 13:51
@Gitstar-OC
Copy link
Copy Markdown
Contributor Author

fixing this today : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notebook not rendering like it has to be

2 participants